# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-gevent
_pkgname=gevent
pkgver=21.1.2
pkgrel=4
pkgdesc='Coroutine-based network library.'
url='https://pypi.org/project/gevent/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2' 'python2-greenlet' 'python2-zope-event'
         'python2-zope-interface')
makedepends=('python2-setuptools' 'cython2')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('1ee2b748a97fa40f67ad2c3b83c6b9f48dbfaae9f2b4f1c118919cfd642c1ca27de0e33a00d950f003f90131354b56a4868ce3051864dbe2ea9b7f22eeafc1eb')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  export EMBED=1
  export CYTHON=cython2
  export PYTHON=python2

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

